#pragma once

#include "fxcc/core/graph/common/pch.h"
#include "fxcc/core/graph/common/Bones.h"
#include "fxcc/core/graph/common/AABB.h"
#include "fxcc/core/graph/common/GeometryData.h"
#include "fxcc/core/graph/common/SkinnedMeshData.h"
#include "fxcc/core/graph/common/MeshJack.h"

namespace fxcc
{
    namespace graph
    {
        namespace common
        {
            struct FXCC_API     MeshData :public Base
            {
                std::string m_Name;

                int m_MaterialIndex = -1;

                AABB m_AABB;

                std::shared_ptr<fxcc::graph::common::Bones> m_Bones;

                std::shared_ptr<GeometryData> m_GeoDataPtr;

                std::shared_ptr<SkinnedMeshData> m_SkinnedMeshDataPtr;

                std::shared_ptr<fxcc::graph::common::MeshJack> m_FixedMesh;

                std::shared_ptr<fxcc::graph::common::MeshJack> m_SkinnedMesh;

                MeshData(aiMesh *mesh);

                bool LoadData(aiMesh *mesh);

                bool HasBones() const;

                std::vector<unsigned int> GetIndices();
                
                std::vector<VertexFixed> GetVertexFixed();

                std::vector<VertexSkinned> GetVertexSkinned();
            };
        };
    }
}